<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //数字类型转换为字符串类型，值仍为数字类型时的值，但是类型变为字符串类型，用+""来进行隐式转换
    //String()可以进行类型的强制转换
    var num=12345;
    var notNum=NaN;
    //隐式转换
    var str=num+"";
    var str=notNum+"";
    console.log(str1,str2);
    var b1=true ;
    var b2=false;
    var str3=b1+"";
    var str4 =b2+"";
    console.log(str3,str4);
    var u1=undifined;
    var n1=null;
    var str5=String(u1);
    var str6=String(n1);
    console.log(str5,str6);
</script>
</html>